package weather.language.forecast;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import weather.language.WhereAndWhen;

/**
 * @author Jerzy Mazurek WEiTI PW
 */
public class WeatherQuestion
{	
	public boolean isQuestionAboutHighTemperature()
	{
		return questionAboutHighTemperature;
	}

	public void setQuestionAboutHighTemperature(boolean questionAboutHighTemperature)
	{
		this.questionAboutHighTemperature = questionAboutHighTemperature;
	}

	public boolean isQuestionAboutLowTemperature()
	{
		return questionAboutLowTemperature;
	}

	public void setQuestionAboutLowTemperature(boolean questionAboutLowTemperature)
	{
		this.questionAboutLowTemperature = questionAboutLowTemperature;
	}

	public Set<ConditionsGroup> getQuestionAboutConditions()
	{
		return questionAboutConditions;
	}

	public void addQuestionAboutConditions(ConditionsGroup questionAboutConditions)
	{
		if(this.questionAboutConditions == null)
			this.questionAboutConditions = new HashSet<ConditionsGroup>();
		this.questionAboutConditions.add(questionAboutConditions);
	}

	public WhereAndWhen[] getWhereAndWhen()
	{
		return whereAndWhen.toArray(new WhereAndWhen[0]);
	}
	
	public void addWhereAndWhen(WhereAndWhen whereAndWhen)
	{
		this.whereAndWhen.add(whereAndWhen);
	}
	
	public void removeWhereAndWhen(WhereAndWhen whereAndWhen)
	{
		this.whereAndWhen.remove(whereAndWhen);
	}
	
	public boolean isQuestionAboutAverageTemperature() {
		return questionAboutAverageTemperature;
	}

	public void setQuestionAboutAverageTemperature(
			boolean questionAboutAverageTemperature) {
		this.questionAboutAverageTemperature = questionAboutAverageTemperature;
	}

	private List<WhereAndWhen> whereAndWhen = new ArrayList<WhereAndWhen>();
	
	private Set<ConditionsGroup> questionAboutConditions = null;
	private boolean questionAboutHighTemperature;
	private boolean questionAboutLowTemperature;
	private boolean questionAboutAverageTemperature;
}
